<?php

header('Content-Type: text/html;charset=UTF-8');

$link = mysqli_connect('localhost', 'root', '', 'simplyproject');

if(mysqli_connect_error()){
	die('Impossible de se connecter à la base de données : '.mysqli_connect_errno().' - '.mysqli_connect_error());
}

$id = $_POST['id'];


// vérification des droits de suppression
$query = "DELETE FROM event WHERE id_event = $id";

if(mysqli_query($link, $query)){
	echo "success";
}

?>